
def fibo(num):
    a, b = 0, 1
    cur_num = 0
    while cur_num < num:
        ret = yield a
        print(ret)  
        a, b = b, a + b
        cur_num += 1

f = fibo(10)


res = next(f)
print(res)
 
 # send可以代替next来取值（也可以说成可以代替它启动）
res = f.send(None)
print(res)

res = f.send('aaaa')
print(res)
